package com.example.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.web.entity.Group;
import com.example.web.service.GroupService;

import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
public class GroupController {

	
	@Autowired
	GroupService groupService; 
	
	@GetMapping("/groups")
	public Group getGroup() {
		
		Group group =	groupService.getGroup();
		log.info("Group：{}",group);
		return group;
	}
	
	
}
